﻿using AnesSystem.Models;
using AnesSystem.Services;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AnesSystem.ViewModels
{
    class ConfigVitalSignsDataGridViewModel : BaseViewModel<ConfigVitalSignsDataGridViewModel>
    {
        #region Variables

        private ObservableCollection<ConfigVitalSignsModel> _configVitalSigns = new ObservableCollection<ConfigVitalSignsModel>();
        private Dictionary<string, ConfigVitalSignsModel> _dicConfigVitalSings = new Dictionary<string, Models.ConfigVitalSignsModel>();
        #endregion

        #region Constructor

        public ConfigVitalSignsDataGridViewModel()
        {
            initConfigChannelsModel();
        }

        #endregion

        #region Properties

        public ObservableCollection<ConfigVitalSignsModel> ConfigVitalSigns
        {
            get
            {
                return _configVitalSigns;
            }

            set
            {
                _configVitalSigns = value;
                RaisePropertyChanged("ConfigVitalSignsModel");
            }
        }

        public Dictionary<string, ConfigVitalSignsModel> DicConfigVitalSings
        {
            get
            {
                return _dicConfigVitalSings;
            }

            set
            {
                _dicConfigVitalSings = value;
            }
        }

        #endregion

        #region Event

        #endregion

        #region Private Methods
        private void initConfigChannelsModel()
        {
            IEnumerable<ConfigVitalSignsModel> list = ConfigVitalSignsModelService.Instance.FindAll();
            foreach (var item in list)
            {
                _configVitalSigns.Add(item);
                _dicConfigVitalSings.Add(item.code, item);
            }
        }

       
        #endregion

        #region Public/Protected Methods


        #endregion

        #region EventHandlers

        #endregion

        #region Command

        #region ChangeDoctorCommand

        #endregion

        #region OpenPopupCommand

        #endregion
        #endregion

    }
}
